<template>
  <!-- 详情 -->
  <el-dialog
    :visible.sync="dialogVisible"
    width="50%"
    append-to-body
    :close-on-click-modal="false"
    :before-close="closedialog"
		title="转场单申请处置详情"
		class="self-dialog"
  >
    <el-descriptions
      :column="2"
      border
    >
			<el-descriptions-item>
        <template slot="label"> 批次号 </template>
        {{ form.manifestId }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 单证号 </template>
        {{ form.billCode }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 提交状态 </template>
				<el-tag v-if="form.status === '1'">已提交</el-tag>
        <el-tag v-else type="info">未提交</el-tag>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 场所号 </template>
        {{ form.fieldCode }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 附件 </template>
				<el-link :href="`${baseUrl}${form.attachFile}`" :underline="true" target="_blank">
					<span class="el-icon-document"> {{form.attachFile}} </span>
				</el-link>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 处置说明 </template>
        {{ form.urgNote }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 创建人 </template>
        {{ form.createBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 创建时间 </template>
        {{ form.createTime }}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import { getTransferUrginfo } from "@/api/system/transferUrginfo";
export default {
  props: {
    detailId: {},
    dict: {},
  },
  data() {
    return {
      //显示详情
      dialogVisible: false,
      form: {
				billCode: null,
        manifestId: null,
        id: null,
        status: null,
        fieldCode: null,
        attachFile: null,
        // suffix: null,
        urgNote: null,
        // createBy: null,
        // createTime: null,
			},
			baseUrl: process.env.VUE_APP_BASE_FILE_URL,
    };
  },
  methods: {
    open() {
      this.dialogVisible = true;
			this.loadDetail();
    },
    closedialog() {
      this.dialogVisible = false;
    },
    // 获取详情
    loadDetail() {
      getTransferUrginfo(this.detailId).then((res) => {
        if (res.code == 200 && res.data) {
          this.form = res.data;
        }
      });
    },
  },
};
</script>

<style>
.el-icon-document {
  color: #1890ff;
}
</style>